import re
from datetime import datetime

from urllib import parse

print(datetime.now().strftime('%Y%m'))

url = 'https://mmbiz.qpic.cn/mmbiz_jpg/YnaVDWI3aicYEbia2o76hJrn4rnmwcY2AqHJDqXvAsXJGOGzUTGexjibUDHqUehumyfk5knH5nicXVBOLYutHHqkrA/640?wx_fmt=jpeg'

url_style = 'background-image: url("https://mmbiz.qpic.cn/mmbiz_png/icp9dibTMg58KtSEldUWTaDaJc4sTZffqx63H1OIiaicRFC1UDbEMGxgr3aOfNLU5Ap9nsMKlI4DXTVSx5moiaLCiazg/0?wx_fmt=png");'

# url结果
result = parse.urlparse(url)
print(result)

# url里的查询参数
query_dict = parse.parse_qs(result.query)
print(query_dict)

res = re.match('.*\"(.*)\".*', url_style)
print(res.group(1))
